﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace _3d
{
    class Camera3D
    {
        public Matrix projection;

        public Vector3 position, LookAt;
        public Camera3D()
        {
            //view = Matrix.CreateLookAt(new Vector3(0, 30, 30), new Vector3(0, 0, 0), Vector3.Up);
            projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, Game1.Self.GraphicsDevice.Viewport.AspectRatio, 1f, 50f);

            position = new Vector3(0, 10, 10);
            LookAt = new Vector3(0, 0, 0);
        }

        public Matrix View
        {

            get
            {
                Matrix view = Matrix.CreateLookAt(position, LookAt, Vector3.Up);

                return view;

            }
        }

    }
}
